package com.pzh.guli.service.acl.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author xzh
 * @since 2022-08-04
 */
@Getter
@Setter
@TableName("acl_permission")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;
     @TableId(type = IdType.ASSIGN_ID)
    private String id;

    private String pid;

    private String name;

    private Integer type;

    private String permissionValue;

    private String path;

    private String component;
    @TableLogic
    private Boolean isDeleted;

    private Integer status;

    private String icon;
    @TableField(exist = false)
    private Integer level;

    @TableField(exist = false)
    private List<Permission> children;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCrated;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtModified;

}
